package com.visitor.demo2.impl;

import com.visitor.demo2.GraphicVisitor;

//RotateGraphicVisitor.java 旋转图形访问者类
/** Rotate:旋转图形操作集合，在此处添加旋转图形的具体代码 */
public class RotateGraphicVisitor implements GraphicVisitor
{
    public void visit(MyCircle graphic)
    {
        System.out.println("已经按顺时针旋转MyCircle " + graphic.angle + " 度");
    }

    public void visit(MyRectangle graphic)
    {
        System.out.println("已经按顺时针旋转MyRectangle " + graphic.angle + " 度");
    }

    public void visit(MyRegularTriangle graphic)
    {
        System.out.println("已经按顺时针旋转MyRegularTriangle " + graphic.angle + " 度");
    }
}